<template>
	<div class="app-container">
		<!-- <Admin></Admin> -->
		<div v-if='dom'>
			<Admin></Admin>
		</div>
		<div v-else>
			<Student></Student>
		</div>
	</div>
</template>

<script setup name="home">
// import HomeUser from "./components/HomeUser.vue";
// import HomeCount from "./components/HomeCount.vue";
// import HomeLine from "./components/HomeLine.vue";
// import HomeTable from "./components/HomeTable.vue";
// import HomePie from './components/HomePie.vue'
import Admin from "./components/Admin.vue"
import Student from "./components/Student.vue"
import {onMounted,ref} from "vue"
import { GlobalStore } from "@/stores";
const globalStore = GlobalStore();
const dom = ref();
const getType = ()=>{
	let type = globalStore.userInfo.type;
	if(type === 'admin'){
		dom.value = 1
	}else{
		dom.value = 0;
	}
}
onMounted(()=>{
	getType()
	// console.log(globalStore.userInfo.type)
})

</script>
